package com.pan.behavioral.visitor.pattern.part;

import com.pan.behavioral.visitor.pattern.Part;
import com.pan.behavioral.visitor.pattern.Visitor;
import com.pan.behavioral.visitor.pattern.visit.FrameVisitor;

import javax.swing.*;
import java.awt.*;

public class ColorPart implements Part {

    @Override
    public void accept(FrameVisitor visitor) {
        Frame frame = visitor.getFrame();
        frame.setBackground(Color.RED);
    }
}
